-
Notifications
You must be signed in to change notification settings - Fork 539
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
sonic-swss: bfdorch changes to support software bfd sessions #3406
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
overall looks good. jsut a few minor comments
extern sai_bfd_api_t* sai_bfd_api; | ||
extern sai_object_id_t gSwitchId; | ||
extern sai_object_id_t gVirtualRouterId; | ||
extern PortsOrch* gPortsOrch; | ||
extern sai_switch_api_t* sai_switch_api; | ||
extern Directory<Orch*> gDirectory; | ||
extern string gMySwitchType; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why extra space
vector<string> keys; | ||
|
||
// Clean up state database BFD entries |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please remove extra new line below this
|
||
# Check BFD session 3 in STATE_DB | ||
createdSessions = self.get_exist_bfd_session() - bfdSessions | ||
bfdSessions = self.get_exist_bfd_session() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you please add a test in test_vnet.py where a vnet route with BFD session is created and added, that way we can be sure that it works fine with VNET routes as well.
@@ -81,6 +100,21 @@ BfdOrch::~BfdOrch(void) | |||
SWSS_LOG_ENTER(); | |||
} | |||
|
|||
std::string BfdOrch::replaceFirstTwoColons(const std::string &input) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you please rename to something like createStateDBKey.
@@ -0,0 +1,189 @@ | |||
import pytest |
Check notice
Code scanning / CodeQL
Unused import Note test
@@ -0,0 +1,189 @@ | |||
import pytest | |||
import time |
Check notice
Code scanning / CodeQL
Unused import Note test
|
||
# Check BFD session 3 in STATE_DB | ||
createdSessions = self.get_exist_bfd_session() - bfdSessions | ||
bfdSessions = self.get_exist_bfd_session() |
Check notice
Code scanning / CodeQL
Unused local variable Note test
What I did
Why I did it
As part of the Smartswitch project, BFD sessions need to be run between DPU and NPU but DPU doesn't currently support BFD hardware offload.
HLD: https://github.com/kperumalbfn/SONiC/blob/kperumal/bfd/doc/smart-switch/BFD/SmartSwitchDpuLivenessUsingBfd.md
HA manager (hamgrd) will be responsible for programming BFD sessions in the DPU by programming BFD_SESSION_TABLE in APP_DB (just like it's currently done for NPU), but bfdorch needs to now program software BFD sessions if it's running on the DPU.
How I verified it
Details if related